
package org.springblade.common.enums.rate;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 事件类型
 */
@Getter
@AllArgsConstructor
public enum RoleTypeEnum {

	MATE("员工","1123598816738675202L",0),
	LEADER("领导","1123598816738675203L",1),
	;

	final String keyword;
	final String roleId;
	final Integer key;

	public static RoleTypeEnum getEnum(String keyword) {
		if (keyword == null) {
			return null;
		} else {
			for (RoleTypeEnum s : RoleTypeEnum.values()) {
				if (s.getKeyword().equals(keyword)) {
					return s;
				}
			}
			return null;
		}
	}
	public static RoleTypeEnum getEnum(Integer key) {
		if (key == null) {
			return null;
		} else {
			for (RoleTypeEnum s : RoleTypeEnum.values()) {
				if (s.getKey().equals(key)) {
					return s;
				}
			}
			return null;
		}
	}

}
